package com.swanclouds.redfish.systems.domain;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.swanclouds.redfish.common.redfish.Status;

/**
 *  * Description:
 *  * Author:      zhangliqiang@asiacom.net.cn
 *  * Date:        2022-07-16 18:55.
 *  
 */
public class MemoryModel {
    /**内存资源的访问路径**/
    @JsonProperty("@odata.id")
    private String dataId;
    /**内存资源模型的OData描述信息**/
    @JsonProperty("@odata.context")
    private String context;
    /**内存资源的类型**/
    @JsonProperty("@odata.type")
    private String type;
    /**内存资源的ID**/
    @JsonProperty("Id")
    private String id;
    /**内存资源的名称**/
    @JsonProperty("Name")
    private String name;
    /**内存资源的制造商**/
    @JsonProperty("Manufacturer")
    private String manufacturer;
    /**内存资源的模型**/
    @JsonProperty("Model")
    private String model;

    
    public String getDataId() {
        return this.dataId;
    }
    /**内存资源的序列号**/
    @JsonProperty("SerialNumber")
    private String serialNumber;

    
    public String getId() {
        return this.id;
    }

    
    public String getName() {
        return this.name;
    }

    
    public String getContext() {
        return this.context;
    }

    
    public String getType() {
        return this.type;
    }

    
    public String getManufacturer() {
        return this.manufacturer;
    }

    
    public String getModel() {
        return this.model;
    }

    
    public String getSerialNumber() {
        return this.serialNumber;
    }

    /**内存的容量，单位为MB**/
    @JsonProperty("CapacityMiB")
    private Integer capacityMiB;
    /**内存资源的当前运行频率**/
    @JsonProperty("OperatingSpeedMHz")
    private String operatingSpeedMHz;
    /**内存资源的类型**/
    @JsonProperty("MemoryDeviceType")
    private String memoryDeviceType;
    /**内存资源的数据带宽**/
    @JsonProperty("DataWidthBits")
    private String dataWidthBits;
    /**内存资源的Rank数量**/
    @JsonProperty("RankCount")
    private Integer rankCount;
    /**内存资源的原厂部件号**/
    @JsonProperty("PartNumber")
    private String partNumber;
    /**内存资源的丝印**/
    @JsonProperty("DeviceLocator")
    private String deviceLocator;
    /**
     * 内存资源的基本模块类型
     * 包括：
     * ● RDIMM
     * ● UDIMM
     * ● SO_DIMM
     * ● LRDIMM
     * ● Mini_RDIMM
     * ● Mini_UDIMM
     * ● SO_RDIMM_72b
     * ● SO_UDIMM_72b
     * ● SO_DIMM_16b
     * ● SO_DIMM_32b
     */
    @JsonProperty("BaseModuleType")
    private String baseModuleType;
    /**内存资源的固件版本，仅当为DCPMM时该值有效**/
    @JsonProperty("FirmwareRevision")
    private String firmwareRevision;
    /**内存资源的易失性容量，仅当为DCPMM时该值有效**/
    @JsonProperty("VolatileRegionSizeLimitMiB")
    private Integer volatileRegionSizeLimitMiB;
    /**内存资源的状态**/
    @JsonProperty("MemoryLocation")
    private MemoryLocation memoryLocation;
    /**内存资源的状态**/
    @JsonProperty("Status")
    private Status status;

    public Integer getCapacityMiB() {
        return capacityMiB;
    }

    public void setCapacityMiB(Integer capacityMiB) {
        this.capacityMiB = capacityMiB;
    }

    public String getOperatingSpeedMHz() {
        return operatingSpeedMHz;
    }

    public void setOperatingSpeedMHz(String operatingSpeedMHz) {
        this.operatingSpeedMHz = operatingSpeedMHz;
    }

    public String getMemoryDeviceType() {
        return memoryDeviceType;
    }

    public void setMemoryDeviceType(String memoryDeviceType) {
        this.memoryDeviceType = memoryDeviceType;
    }

    public String getDataWidthBits() {
        return dataWidthBits;
    }

    public void setDataWidthBits(String dataWidthBits) {
        this.dataWidthBits = dataWidthBits;
    }

    public Integer getRankCount() {
        return rankCount;
    }

    public void setRankCount(Integer rankCount) {
        this.rankCount = rankCount;
    }

    public String getPartNumber() {
        return partNumber;
    }

    public void setPartNumber(String partNumber) {
        this.partNumber = partNumber;
    }

    public String getDeviceLocator() {
        return deviceLocator;
    }

    public void setDeviceLocator(String deviceLocator) {
        this.deviceLocator = deviceLocator;
    }

    public String getBaseModuleType() {
        return baseModuleType;
    }

    public void setBaseModuleType(String baseModuleType) {
        this.baseModuleType = baseModuleType;
    }

    public String getFirmwareRevision() {
        return firmwareRevision;
    }

    public void setFirmwareRevision(String firmwareRevision) {
        this.firmwareRevision = firmwareRevision;
    }

    public Integer getVolatileRegionSizeLimitMiB() {
        return volatileRegionSizeLimitMiB;
    }

    public void setVolatileRegionSizeLimitMiB(Integer volatileRegionSizeLimitMiB) {
        this.volatileRegionSizeLimitMiB = volatileRegionSizeLimitMiB;
    }

    public MemoryLocation getMemoryLocation() {
        return memoryLocation;
    }

    public void setMemoryLocation(MemoryLocation memoryLocation) {
        this.memoryLocation = memoryLocation;
    }

    public Status getStatus() {
        return status;
    }

    public void setStatus(Status status) {
        this.status = status;
    }

    
    public String toString() {
        ObjectMapper objectMapper = new ObjectMapper();
        try {
            return objectMapper.writeValueAsString(this);
        } catch (JsonProcessingException e) {
        }
        return "MemoryModel{" +
                "dataId='" + dataId + '\'' +
                ", context='" + context + '\'' +
                ", type='" + type + '\'' +
                ", id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", manufacturer='" + manufacturer + '\'' +
                ", model='" + model + '\'' +
                ", serialNumber='" + serialNumber + '\'' +
                ", capacityMiB=" + capacityMiB +
                ", operatingSpeedMHz='" + operatingSpeedMHz + '\'' +
                ", memoryDeviceType='" + memoryDeviceType + '\'' +
                ", dataWidthBits='" + dataWidthBits + '\'' +
                ", rankCount=" + rankCount +
                ", partNumber='" + partNumber + '\'' +
                ", deviceLocator='" + deviceLocator + '\'' +
                ", baseModuleType='" + baseModuleType + '\'' +
                ", firmwareRevision='" + firmwareRevision + '\'' +
                ", volatileRegionSizeLimitMiB=" + volatileRegionSizeLimitMiB +
                ", memoryLocation=" + memoryLocation +
                ", status=" + status +
                '}';
    }

    @JsonRootName("MemoryLocation")
    public static class MemoryLocation {
        @JsonProperty("Socket")
        private String socket;

        @JsonProperty("Controller")
        private String controller;

        @JsonProperty("Channel")
        private String channel;

        @JsonProperty("Slot")
        private String slot;

        public String getSocket() {
            return this.socket;
        }

        public void setSocket(String socket) {
            this.socket = socket;
        }

        public String getController() {
            return this.controller;
        }

        public void setController(String controller) {
            this.controller = controller;
        }

        public String getChannel() {
            return this.channel;
        }

        public void setChannel(String channel) {
            this.channel = channel;
        }

        public String getSlot() {
            return this.slot;
        }

        public void setSlot(String slot) {
            this.slot = slot;
        }
    }
}
